

function registerVerify(){
    lengthChance("oName",30);
    lengthChance("idNum",18);
    lengthChance("registerPNum",11);
    lengthChance("reason",500);

    $("#oName").blur(function(){

        isTrue("oName","isEmpty","请输入您的真实姓名");
     
    })
    $("#idNum").blur(function(){
        // isPass[i] = false;
        if(isTrue("idNum","isEmpty","身份证号不能为空"))
        isTrue("idNum","isIdNum","请输入有效身份证号");
      
    })
    $("#registerPasswords").blur(function(){
        // isPass[i] = false;
        isTrue("registerPasswords","isEmpty","密码不能为空")
    
      window.onkeyup=function(){
        isTrue("rePasswords","isAffirm","密码不一致","registerPasswords");
      }
    })
    $("#rePasswords").blur(function(){
   
      isTrue("rePasswords","isAffirm","密码不一致","registerPasswords");
     
    })
    $("#registerPNum").blur(function(){

        if(isTrue("registerPNum","isEmpty","手机号码不能为空"))
       isTrue("registerPNum","isPhoneNum","请输入正确的手机号码");
       
    })
    $("#registerVerify").blur(function(){

    isTrue("registerVerify","isEmpty","验证码不能为空")
        
    })
    $("#reason").blur(function(){

        if(!isTrue("reason","isEmpty","请填写申请理由")){
            $("#reason").parent().next().css("bottom",72)
        }
      
    })
    $("#create").click(function(){
        $("#oName").blur();
        $("#idNum").blur();
        $("#registerPasswords").blur();
        $("#registerPNum").blur();
        $("#registerVerify").blur();
        $("#reason").blur()
        if($("o").length===0){
            alert("注册成功")
            window.location.href="index.html";
        }
    })
   
}
registerVerify()